﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PlayListSet.UI.ValueConverter
{
    internal class IntToVis : System.Windows.Data.IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var  v = (int)value;
            var p = (parameter+"").Split(';');
            foreach (var item in p)
            {
                if(v==System.Convert.ToInt32(item))
                    return System.Windows.Visibility.Visible;
            }
            return System.Windows.Visibility.Collapsed;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
           
            return 0;
        }
    }
}
